.class public abstract Lnet/tsapps/topdeals/abstractactivities/SwypeActivity;
.super Lnet/tsapps/topdeals/abstractactivities/BaseActivity;

# interfaces
.implements Landroid/view/GestureDetector$OnGestureListener;


# instance fields
.field protected i:Z

.field protected j:Landroid/view/Display;

.field private k:Landroid/view/GestureDetector;


# direct methods
.method public constructor <init>()V
    .locals 0

    invoke-direct {p0}, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;-><init>()V

    return-void
.end method


# virtual methods
.method protected abstract a()V
.end method

.method public dispatchTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 1

    invoke-super {p0, p1}, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->dispatchTouchEvent(Landroid/view/MotionEvent;)Z

    iget-object v0, p0, Lnet/tsapps/topdeals/abstractactivities/SwypeActivity;->k:Landroid/view/GestureDetector;

    invoke-virtual {v0, p1}, Landroid/view/GestureDetector;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v0

    return v0
.end method

.method protected abstract e()V
.end method

.method public onCreate(Landroid/os/Bundle;)V
    .locals 1

    new-instance v0, Landroid/view/GestureDetector;

    invoke-direct {v0, p0}, Landroid/view/GestureDetector;-><init>(Landroid/view/GestureDetector$OnGestureListener;)V

    iput-object v0, p0, Lnet/tsapps/topdeals/abstractactivities/SwypeActivity;->k:Landroid/view/GestureDetector;

    invoke-virtual {p0}, Lnet/tsapps/topdeals/abstractactivities/SwypeActivity;->getWindowManager()Landroid/view/WindowManager;

    move-result-object v0

    invoke-interface {v0}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;

    move-result-object v0

    iput-object v0, p0, Lnet/tsapps/topdeals/abstractactivities/SwypeActivity;->j:Landroid/view/Display;

    invoke-super {p0, p1}, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->onCreate(Landroid/os/Bundle;)V

    return-void
.end method

.method public onDown(Landroid/view/MotionEvent;)Z
    .locals 1

    const/4 v0, 0x0

    return v0
.end method

.method public onFling(Landroid/view/MotionEvent;Landroid/view/MotionEvent;FF)Z
    .locals 7

    const/4 v0, 0x1

    const/4 v1, 0x0

    iget-boolean v2, p0, Lnet/tsapps/topdeals/abstractactivities/SwypeActivity;->i:Z

    if-eqz v2, :cond_1

    move v0, v1

    :cond_0
    :goto_0
    return v0

    :cond_1
    iget-object v2, p0, Lnet/tsapps/topdeals/abstractactivities/SwypeActivity;->j:Landroid/view/Display;

    invoke-virtual {v2}, Landroid/view/Display;->getWidth()I

    move-result v2

    iget-object v3, p0, Lnet/tsapps/topdeals/abstractactivities/SwypeActivity;->j:Landroid/view/Display;

    invoke-virtual {v3}, Landroid/view/Display;->getHeight()I

    move-result v3

    invoke-static {v2, v3}, Ljava/lang/Math;->min(II)I

    move-result v2

    div-int/lit8 v2, v2, 0x4

    iget-object v3, p0, Lnet/tsapps/topdeals/abstractactivities/SwypeActivity;->j:Landroid/view/Display;

    invoke-virtual {v3}, Landroid/view/Display;->getWidth()I

    move-result v3

    iget-object v4, p0, Lnet/tsapps/topdeals/abstractactivities/SwypeActivity;->j:Landroid/view/Display;

    invoke-virtual {v4}, Landroid/view/Display;->getHeight()I

    move-result v4

    invoke-static {v3, v4}, Ljava/lang/Math;->max(II)I

    move-result v3

    div-int/lit8 v3, v3, 0x8

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v4

    invoke-virtual {p2}, Landroid/view/MotionEvent;->getX()F

    move-result v5

    sub-float/2addr v4, v5

    invoke-static {v4}, Ljava/lang/Math;->abs(F)F

    move-result v4

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v5

    invoke-virtual {p2}, Landroid/view/MotionEvent;->getY()F

    move-result v6

    sub-float/2addr v5, v6

    invoke-static {v5}, Ljava/lang/Math;->abs(F)F

    move-result v5

    cmpl-float v6, v5, v4

    if-gtz v6, :cond_0

    int-to-float v3, v3

    cmpl-float v3, v5, v3

    if-gtz v3, :cond_0

    invoke-static {p3}, Ljava/lang/Math;->abs(F)F

    move-result v3

    invoke-static {p4}, Ljava/lang/Math;->abs(F)F

    const/high16 v5, 0x42c8

    cmpl-float v3, v3, v5

    if-lez v3, :cond_3

    int-to-float v2, v2

    cmpl-float v2, v4, v2

    if-lez v2, :cond_3

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v1

    invoke-virtual {p2}, Landroid/view/MotionEvent;->getX()F

    move-result v2

    cmpl-float v1, v1, v2

    if-lez v1, :cond_2

    invoke-virtual {p0}, Lnet/tsapps/topdeals/abstractactivities/SwypeActivity;->a()V

    goto :goto_0

    :cond_2
    invoke-virtual {p0}, Lnet/tsapps/topdeals/abstractactivities/SwypeActivity;->e()V

    goto :goto_0

    :cond_3
    move v0, v1

    goto :goto_0
.end method

.method public onLongPress(Landroid/view/MotionEvent;)V
    .locals 0

    return-void
.end method

.method public onScroll(Landroid/view/MotionEvent;Landroid/view/MotionEvent;FF)Z
    .locals 1

    const/4 v0, 0x0

    return v0
.end method

.method public onShowPress(Landroid/view/MotionEvent;)V
    .locals 0

    return-void
.end method

.method public onSingleTapUp(Landroid/view/MotionEvent;)Z
    .locals 1

    const/4 v0, 0x0

    return v0
.end method

.method public onTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 1

    iget-object v0, p0, Lnet/tsapps/topdeals/abstractactivities/SwypeActivity;->k:Landroid/view/GestureDetector;

    invoke-virtual {v0, p1}, Landroid/view/GestureDetector;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v0

    return v0
.end method
